<?php if (!defined('THINK_PATH')) exit();?>﻿<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>领取礼品</title>
    <link rel="stylesheet" href="__CSS__/main.css"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0 user-scalable=no">
</head>
<body>
<div id="wrapper">
    <img class="index-background" src="__IMG__/home/index.jpg" alt=""/>
    <a class="go-submit" _href="<?php echo U('Home/Index/detail',array('code'=>$code));?>"></a>
</div>
<script src="__JS__/home/jquery.js"></script>
<script type="text/javascript">
    $(function(){
        var url = "<?php echo U('Home/Index/checkGoods');?>";
        var code = "<?php echo ($code); ?>";

        $('.go-submit').click(function(){
            var _href = $(this).attr('_href');
            
            $.post(url,{code:code},function(data){
                if(data.status==200){
                    window.location.href=_href;
                }else{
                    alert(data.msg);
                }
            },'json');
        });
    })
</script>
</body>
</html>